<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- <script src="js/数组.js"/> -->
    <!-- <script src="js/类.js"/> -->
    <!-- // <script src="js/继承.js"/> -->
     <!-- <script src="js/继承-复杂.js"/> -->
     <!-- <script src="js/泛型.js"/> -->
     <!-- <script src="js/类型兼容性.js"/> -->
     <!-- <script src="js/迭代器.js"/> -->
     <script src="js/01_声明类型//enum.js"/>
    <title>Document</title>
</head>
<body>
    <script>
        for (var i = 0; i < 10; i++) {
    setTimeout(function() { console.log(i); }, 100 * i);
}

for (var i = 0; i < 10; i++) {
    // capture the current state of 'i'
    // by invoking a function with its current value
    (function(i) {
        setTimeout(function() { console.log(i); }, 100 * i);
    })(i);
}
    </script>
</body>
</html>
